package com.aji.wineserver.controller;

import com.aji.winecommon.result.Result;
import com.aji.winepojo.entity.ClassData;
import com.aji.winepojo.entity.IdentData;
import com.aji.wineserver.service.ModelDataService;
import com.aji.wineserver.service.ModelService;
import com.aji.wineserver.service.WineService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/view")
@Api(tags = "可视化统计数据")
@Slf4j
public class ViewController {
    @Autowired
    WineService wineService;
    @Autowired
    private ModelDataService modelDataService;
    @ApiOperation("查询 酒类识别状态统计数据")
    @GetMapping("/ident")
    public Result selectIdentData(){
        List<IdentData> list =wineService.selectIdentData();
        return Result.success(list);
    }
    @ApiOperation("查询 酒类分类统计数据")
    @GetMapping("/class")
    public Result selectClassData(){
        List<ClassData>list =wineService.selectClassData();
        return Result.success(list);
    }
    @ApiOperation("查询 载入模型")
    @GetMapping("/model")
    public Result selectModel(){
        return Result.success(modelDataService.list());
    }
}
